



Key readKey()
{
	unsigned char a = getch();
	switch (a)
	{
	case 0xE0:
	{	
		unsigned char b = getch();
		switch(b)
		{
		case 0x48:
			return KeyUp;
		case 0x50:
			return KeyDown;
		case 0x4B:
			return KeyLeft;
		case 0x4D:
			return KeyRight;
		}
		break;		
	}
//	case 0x0D:
//		return KeyEnter;
	case 0x20:
		return KeySpace;
	case 0x09:
		return KeyTab;	
	case 0x1B: 
		return KeyEsc;
	default:
		return KeyUnknown;
	}
}

Numbers readNum ()
{
	unsigned char a = getch();
	switch (a)
	{
	case 0x30:
	case 0x60:
		return N_0;
	case 0x31:
	case 0x61:
		return N_1;
	case 0x32:
	case 0x62:
		return N_2;
	case 0x33:
	case 0x63:
		return N_3;
	case 0x34:
	case 0x64:
		return N_4;
	case 0x35:
	case 0x65:
		return N_5;
	case 0x36:
	case 0x66:
		return N_6;
	case 0x37:
	case 0x67:
		return N_7;
	case 0x38:
	case 0x68:
		return N_8;
	case 0x39:
	case 0x69:
		return N_9;
	default:
		return NoDigit;
	}
}



